﻿/*****************************************************************//**
  * @file   VAOneXMLAdaptorFESubSystems.h
  * @brief  VAOne读写FE结构子系统单元列表适配器
  *
  * @author lilongyuan (lilongyuan@diso.cn)
  * @date   2025-01-15
  *********************************************************************/
#ifndef VAONEXMLADAPTORFESUBSYSTEMS_H
#define VAONEXMLADAPTORFESUBSYSTEMS_H

#include "FITKAbstractVAOneXMLAdaptor.h"

namespace IO
{
    /**
    * @brief   VAOne读写FE结构子系统适配器
    * @author  lilongyuan (lilongyuan@diso.cn)
    * @date    2025-01-15
    */
    class FITKVAOneXMLIOAPI VAOneXMLAdaptorFESubSystems : public FITKAbstractVAOneXMLAdaptor
    {
        FITKCLASS(IO, VAOneXMLAdaptorFESubSystems);
    public:

        /**
         * @brief   构造函数
         * @author  lilongyuan (lilongyuan@diso.cn)
         * @date    2025-01-15
         */
        explicit VAOneXMLAdaptorFESubSystems() = default;
        /**
         * @brief   析构函数
         * @author  lilongyuan (lilongyuan@diso.cn)
         * @date    2025-01-15
         */
        ~VAOneXMLAdaptorFESubSystems() = default;
        /**
         * @brief   适配器读数据
         * @return  是否执行成功
         * @author  lilongyuan (lilongyuan@diso.cn)
         * @date    2025-01-15
         */
        bool adaptR() override;
        /**
         * @brief   适配器写数据
         * @return  是否执行成功
         * @author  lilongyuan (lilongyuan@diso.cn)
         * @date    2025-01-15
         */
        bool adaptW() override;

    private:
        /**
         * @brief     读取FE结构子系统数据
         * @param[i]  node FESubsystem节点
         * @return    是否执行成功
         * @author    lilongyuan (lilongyuan@diso.cn)
         * @date      2025-02-06
         */
        bool readFESubsystem(rapidxml::xml_node<char>* node);

        /**
         * @brief     写出FE结构子系统数据
         * @param[i]  node Model节点
         * @return    是否执行成功
         * @author    lilongyuan (lilongyuan@diso.cn)
         * @date      2025-02-06
         */
        bool writeFESubsystems(rapidxml::xml_node<char>* node);
    };
    Register2FITKIOAdaptorFactory(VAOneXML, FESubsystems, VAOneXMLAdaptorFESubSystems)
}

#endif // VAONEXMLADAPTORFESUBSYSTEMS_H

